package com.example.pfe;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.TextView;


public class bande extends Activity implements TextWatcher{
	Button ajouter = null;
	 private TextView selection;
	   private AutoCompleteTextView choix;
	   private enum Semaine {Lundi, Mardi, Mercredi, Jeudi, Vendredi, Samedi, Dimanche};
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.formulaire_bande);
		 selection = (TextView) findViewById(R.id.selection);
	      choix = (AutoCompleteTextView) findViewById(R.id.choix);
	      choix.addTextChangedListener(this);
	      choix.setAdapter(new ArrayAdapter<Semaine>(this, android.R.layout.simple_dropdown_item_1line, Semaine.values()));
	}
	  public void beforeTextChanged(CharSequence chaine, int debut, int apres, int nombre) { }

	   public void onTextChanged(CharSequence chaine, int debut, int fin, int nombre) {
	      selection.setText(choix.getText());
	   }

	   public void afterTextChanged(Editable chaine) {  }
	}